/*
Zachary Herrick
Touch'd Reader
// Node 1 Rank 1 Spell 01 FireBall1,		Rank 2 Spell 02 FireBall2,		Rank 3 Spell 03 FireBall3 
// Node 2 Rank 1 Spell 40 Tremor,			Rank 2 Spell 42 Aftershock,		Rank 3 Spell 49 EarthQuake
// Node 3 Rank 1 Spell 16 Rising Tide,		Rank 2 Spell 17 Cure Water 2,	Rank 3 Spell 23 Tsunami
// Node 4 Rank 1 Spell 27 Healing Wind		Rank 2 Spell 30 Gust,			Rank 3 Spell 36 Tornado
*/

#pragma once

#include<iostream>
#include<fstream>
#include "Enum.h"

using namespace std;  // Only in here to cout spellHolder to check for proper data


struct Spell
{
	int ElementNumber;	// Hold the enum for the element 
	int Number;			// Holds the spell number? .... why do i have this? oh ya the AI needs a number to see the diffrence between the spells
	int Power;			// This will be used by the AI-Kun to get the power of the spell... 
	int Damage;			// The damage the spell can do
	int Effect;			// This Holds the enum for the effect the spell has.... although we have none so it will go unused for now
	int mPointX[10];
	int mPointY[10];
	int ID;
};


struct File
{
	int trunk;
	int nNodes;
	int spell[4][10];
};



struct Trunk
{
	int mPointX[20];
	int mPointY[20];
};

class fileReader
{
private:

	int nNodes;
	int trunk;

public:
	Spell SpellHolder[8][4];
	Spell getSpellHold(int Node, int Rank) { return SpellHolder[Node][Rank]; }
	Trunk getTrunk() { return TrunkP; } // Zach is losing his mind at this point.....

	Trunk TrunkP;
	int getNumberNodes();
	int getSpellNumberTenths();
	int getSpellNumberOnes();
	File readFile(char [24]);
	void setSpell(File, char [], int);			// expanded parameters
	Spell findSpell(int num, char [], int);		// expanded parameters
	void setSpell(Spell &, Spell);
	void getSpell();
	int getNodes() { return nNodes; }
	int getNumber(int x,int y) { return SpellHolder[x][5].Number; }

};

